/*
 * @Description: 
 * @Author: 张凌瑞
 * @Date: 2021-02-25 15:54:32
 * @LastEditTime: 2021-02-26 12:01:38
 * @LastEditors: 张凌瑞
 */

import { getData } from "../../api/car";
import { GETDATA ,TAB} from "../types/car.types";

export const getD = (id:string) => {
    return (dispatch: any) => {
        getData(id).then(res => {
            // console.log(res.data.data);
            dispatch({ type: GETDATA, data: res.data.data });
        })
    }
}

//年份切换
export const btnTa = (i: string) => {
    return (dispatch: any) => {
        dispatch({ type: TAB ,i})
    }
}